import math
s=input()
#s="5,10,8,12,6,17,"
x1=y1=0
k=1
j=0
totald=0
for i in range(0,len(s)):
    if s[i]=="," :
        v=int(s[j:i])
        j=i+1
        if k % 2==1 :
            x2=v
        else:
            y2=v
            d=math.sqrt((x2-x1)**2+(y2-y1)**2)
            totald=totald+d
            x1=x2
            y1=y2
        k=k+1
print(totald)
